#ifndef MKAHYPAR_TYPEDEF_H
#define MKAHYPAR_TYPEDEF_H
#include <cstdint>
#include <vector>
#include <unordered_map>
#include "mkahypar/datastructure/hypergraph.h"
#include "mkahypar/datastructure/robin_hood.h"
namespace mkahypar{
  using HypernodeID = uint32_t;
  using HyperedgeID = uint32_t;
  using HypernodeWeight = int32_t;
  using HyperedgeWeight = int32_t;
  using PartitionID = int32_t;
  using RatingType = double;
  using GainType = int64_t;

  //robin map
  template<typename K, typename V>
  using Map = robin_hood::unordered_map<K,V>;

  template<typename K>
  using Set = robin_hood::unordered_set<K>;

  using Hypergraph = mkahypar::ds::GenericHypergraph<HypernodeID,
          HyperedgeID, HypernodeWeight,
          HyperedgeWeight, PartitionID>;
  using TargetGraph = mkahypar::ds::FPGAGraph;

  using NodeWeight = mkahypar::ds::NodeResource;

  using IncidenceIterator = Hypergraph::IncidenceIterator;
}
namespace std {
  static mkahypar::IncidenceIterator begin(const std::pair<mkahypar::IncidenceIterator,
          mkahypar::IncidenceIterator>& x) {
    return x.first;
  }

  static mkahypar::IncidenceIterator end(const std::pair<mkahypar::IncidenceIterator,
          mkahypar::IncidenceIterator>& x) {
    return x.second;
  }

  template <typename Iterator>
  Iterator begin(std::pair<Iterator, Iterator>& x) {
    return x.first;
  }

  template <typename Iterator>
  Iterator end(std::pair<Iterator, Iterator>& x) {
    return x.second;
  }
}  // namespace std

#endif //MKAHYPAR_TYPEDEF_H
